#include "score.h"

CScore::CScore():m_score(0)
{

}

void CScore::setInc(int score)
{
    m_score += score;
}

void CScore::paint(QPainter *painter)
{
    painter->setPen(Qt::red);
    QFont font("宋体",20,QFont::Bold,true);
    painter->setFont(font);
    painter->drawText(
                static_cast<int>(getX()),
                static_cast<int>(getY()),
                QString::number(m_score));

}
